package main

import (
	"fmt"
)

//多返回值|sdutyGo-7-多函数返回值

func fool(a string, b int8) int {
	fmt.Println(a, b)
	c := 200
	return c
}

// fool2  返回多个值，匿名
func fool2(a string, b int8) (int, int) {
	fmt.Println(a, b)
	c := 200
	return c, 88
}

// fool3 返回多个值，有形参的
func fool3(a string, b int8) (r1 int, r2 int) {
	fmt.Println(a, b)
	fmt.Println(r1, r2)
	r1 = 1000
	r2 = 2000
	return
}

// fool4 同 fool3
func fool4(a string, b int8) (r1, r2 int) {
	fmt.Println(a, b)
	fmt.Println(r1, r2)
	// 给有名称的返回值赋值
	r1 = 1000
	r2 = 2000
	return
}
func main() {
	r1, r2 := fool3("a", 88)
	fmt.Println(r1, r2)

}
